package com.happystudy.controller;

import com.happpystudy.model.User;
import com.happpystudy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class RegisterController {

    @Autowired
    UserService userService;
    @PostMapping("/register")
    public String doRegister(User user){
        System.out.println(user);
        userService.doRegister(user);
        return "success!";
    }

}
